package com.qs.utils;

/**
 * ClassName: EncryptUtils
 * Package: com.qs.utils
 * Description:
 *
 * @Author: @weixueshi
 * @Create: 2023/11/18 - 10:17
 * @Version: v1.0
 */

import lombok.extern.slf4j.Slf4j;
import org.springframework.util.DigestUtils;

/**
 * 加密工具
 */
@Slf4j
public class EncryptUtils {
    public static  String MD5Password(String password) {
        password = DigestUtils.md5DigestAsHex(password.getBytes());
        return password;
    }

    public static void main(String[] args) throws Exception {
        String password = "123456";
        log.info(EncryptUtils.MD5Password(password));
    }
}
